﻿using pbvs.Data;
using System.Linq;
using System.Web.Mvc;

namespace pbvs.Controllers
{
    public class SharedController : Controller
    {
        //
        // GET: /Shared/

        public ActionResult Menu()
        {
            using (PbvsContext db = new PbvsContext())
            {
                var pages = db.ContentPages.Include("Children").Where(p => p.Parent == 0 && !string.IsNullOrEmpty(p.MenuTitle)).ToList();
                return PartialView(pages);
            }

        }

    }
}
